﻿using Microsoft.UI.Xaml;
using Microsoft.UI.Xaml.Data;

namespace WhaleAccount.Helpers;
internal class BoolToButtonVisibilityConverter: IValueConverter
{
    public object Convert(object value, Type targetType, object parameter, string language)
    {
        var isEditable = (bool)value;
        return isEditable ? Visibility.Visible : Visibility.Collapsed;
    }
    public object ConvertBack(object value, Type targetType, object parameter, string language)
    {
        var visibility = (Visibility)value;
        return visibility == Visibility.Visible;
    }
}
